package com.allen.study.domain.entity;

import com.allen.study.common.base.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDateTime;

/**
 * 审批记录表实体
 *
 * @author AllenSun
 * @since 2025-04-23 20:46
 */
@Getter
@Setter
@ToString
public class ApprovalRecord extends BaseEntity<Long> {


    /**
     * 
     */
    private String processInstanceId;

    /**
     * 
     */
    private String approverId;

    /**
     * 
     */
    private Boolean approvalResult;

    /**
     * 
     */
    private String approvalReason;

    private String eventName;

    /**
     * 
     */
    private LocalDateTime approvalTime;

    /**
     * 检查租户和当前用户租户是否一致
     *
     * @return true:一致;false:不一致
     */
    public boolean checkTenant() {
        // 获取当前用户
        //SecurityUser securityUser = SecurityUserHelper.get();
        //return Objects.equals(this.getTenantId(), securityUser.getTenantId());
        return true;
    }
}
